import request from '@/utils/request'


export function login(username, password) {
  return request({
    url: '/user/login',
    method: 'post',
    data: {
      username,
      password
    }
  })
}
//获取用户信息 //数据库 用户id
export function getInfo() {
  return request({
    url: '/user/info',
    method: 'get',
  })
}
//注册
export function createUser(data) {
  return request({
    url: '/user/register',
    method: 'post',
    data: data
  })
}

